//导航
var Tabbar = {
    template: `<div  v-show="appear">
                    <div class="tabbar"> 
                      <router-link :to="{name:'indexlink'}" tag="div" class="tabberList" @click.native="tabberList(0)">
                         <div class="tabbaricon">
                            <img :src="tabbarIndex==0?'./images/tabbaricon2.png':'./images/tabbaricon1.png'" alt="首页">
                         </div> 
                         <span :class="tabbarIndex==0?'tabbarActive':''">首页</span>
                      </router-link>
                      <router-link :to="{name:'releaselink'}" tag="div" class="tabberList" @click.native="tabberList(1)">
                         <div class="tabbaricon">
                           <img :src="tabbarIndex==1?'./images/tabbaricon4.png':'./images/tabbaricon3.png'" alt="发布">
                         </div> 
                         <span :class="tabbarIndex==1?'tabbarActive':''">发布</span>
                      </router-link>
                      <router-link :to="{name:'mylink'}" tag="div" class="tabberList" @click.native="tabberList(2)">
                         <div class="tabbaricon">
                            <img :src="tabbarIndex==2?'./images/tabbaricon6.png':'./images/tabbaricon5.png'" alt="我的">
                         </div> 
                         <span :class="tabbarIndex==2?'tabbarActive':''">我的</span>
                      </router-link>
                      </div>
                  
               </div> `,
    data() {
        return {
            tabbarIndex: 0,
            appear:true
        }
    },
    mounted:function () {},
    methods: {
        tabberList: function (index) {
            console.log(index)
            this.tabbarIndex = index
        },
    }
}
